package com.shensi.api.admin.client.integral;

import com.shensi.api.admin.client.fallback.integral.CustomerPointsClientFallBack;
import com.shensi.api.admin.client.fallback.monitor.SysLogininforClientFallBack;
import com.shensi.api.admin.domian.integral.dto.CustomerPointsDto;
import com.shensi.api.admin.domian.system.SysLogininfor;
import com.shensi.common.core.annotation.Log;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.domain.model.LoginUser;
import com.shensi.common.core.enums.BusinessType;
import com.shensi.common.core.page.TableDataInfo;
import com.shensi.common.core.utils.SecurityUtils;
import com.shensi.common.core.utils.poi.ExcelUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;


/**
 * @author mao
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerPointsClientFallBack.class)
@Component
public interface CustomerPointsClient {
    /**
     * 查询用户积分列表
     */
    @GetMapping("/integral/points/list")
    public TableDataInfo list(CustomerPointsDto customerPoints);

    /**
     * 导出用户积分列表
     */
    @GetMapping("/integral/points/export")
    public AjaxResult export(CustomerPointsDto customerPoints);

    /**
     * 获取用户积分详细信息
     */
    @GetMapping(value = "/integral/points/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 新增用户积分
     */
    @PostMapping("/integral/points")
    public AjaxResult add(@RequestBody CustomerPointsDto customerPoints);

    /**
     * 修改用户积分
     */
    @PutMapping("/integral/points")
    public AjaxResult edit(@RequestBody CustomerPointsDto customerPoints);

    /**
     * 删除用户积分
     */
    @DeleteMapping("/integral/points/{ids}")
    public AjaxResult remove(@PathVariable("ids") Long[] ids);

}
